import logging,yagmail,HTMLTestRunner_cn
import time


def log():
    tm=time.strftime('%Y%m%d_%H%M%S',time.localtime())
    logging.basicConfig(level=logging.DEBUG,
                        format='%(filename)s %(asctime)s %(message)s %(levelname)s %(lineno)d',
                        filename=f'hj+{tm}+.log',
                        filemode='w')
def Rerport():
    report=HTMLTestRunner_cn.HTMLTestRunner(
        open(r'C:\Users\30347\PycharmProjects\rkao_0924\po\baogao\hj.html','w'),
        title='测试报告',
        description='测试报告'
    )
    return report
def send():
    mail=yagmail.SMTP(user='3034738910@qq.com',password='aytttpqxjbbrddjh',host='smtp.qq.com')
    mail.send(to='3034738910@qq.com',subject='测试报告',contents='今日报告请查收')